package cn.tedu.boot01.Controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 作者：HeShaoShuai
 * @Email 邮箱：2569819541@qq.com
 * @Date 日期：2023/5/10 20:46
 * @Package 包名：cn.tedo.boot01.Controller
 * @Project 项目名：JavaSE
 * @Version 1.0
 */
@Controller
public class BMIController {
	@RequestMapping("/bmi")
	@ResponseBody
	public String bmi(Double h, Double w) {
		//soutp
		System.out.println("h=" + h + ",w=" + w);
		double bmi = w / (h * h);
		if (bmi < 18.5) {
			return "兄弟你瘦了！";
		}
		if (bmi < 24) {
			return "身体健康";
		}
		if (bmi < 27) {
			return "微微胖";
		}
		return "胖了";
	}
}
